// The Vue build version to load with the `import` command
// (runtime-only or standalone) has been set in webpack.base.conf with an alias.
import '@/assets/icons/iconfont.css'
import '@/assets/css/common.scss'
import config from '@/config'
import importDirective from '@/directive'
import installPlugin from '@/plugin'
import 'bootstrap-icons/font/bootstrap-icons.min.css'
import ElementUI from 'element-ui'
import locale from 'element-ui/lib/locale/lang/zh-CN'
import 'element-ui/lib/theme-chalk/index.css'
// import iView from 'iview'
import {directive as clickOutside} from 'v-click-outside-x'
import VOrgTree from 'v-org-tree'
import 'v-org-tree/dist/v-org-tree.css'
import 'video.js/dist/video-js.css'
import Vue from 'vue'
import VideoPlayer from 'vue-video-player'
import App from './App'
import './index.less'
import router from './router'
import store from './store'
import ViewUI from 'view-design'
import 'view-design/dist/styles/iview.css'

import 'xe-utils'
import VXETable from 'vxe-table'
import 'vxe-table/lib/style.css'
// 引入导出插件
import VXETablePluginExportXLSX from 'vxe-table-plugin-export-xlsx'

// 实际打包时应该不引入mock
/* eslint-disable */
if (process.env.NODE_ENV !== 'production') require('@/mock')
// Vue.use(ElementUI, {size: 'small'})
Vue.use(VideoPlayer)
// Vue.use(iView, {
//     i18n: (key, value) => i18n.t(key, value)
// })
Vue.use(ViewUI)
Vue.use(VXETable)
VXETable.use(VXETablePluginExportXLSX)
// import locale from 'view-design/dist/locale/en-US'
// Vue.use(ViewUI, {locale})

Vue.use(ElementUI, {size: 'small', locale})
Vue.use(VOrgTree)
/**
 * @description 注册admin内置插件
 */
installPlugin(Vue)
/**
 * @description 生产环境关掉提示
 */
Vue.config.productionTip = false
/**
 * @description 全局注册应用配置
 */
Vue.prototype.$config = config
/**
 * 注册指令
 */
importDirective(Vue)
Vue.directive('clickOutside', clickOutside)

/* eslint-disable no-new */
new Vue({
    el: '#app',
    router,
    store,
    render: (h) => h(App)
})
